package com.weiyuwqj.server.service.sys.impl;

import com.github.pagehelper.PageHelper;
import com.weiyuwqj.server.service.base.BaseServiceImpl;
import com.weiyuwqj.server.mapper.SysNoticeMapper;
import com.weiyuwqj.api.service.SysNoticeService;
import com.weiyuwqj.api.common.PageList;
import com.weiyuwqj.api.common.Paginator;
import com.weiyuwqj.api.model.SysNotice;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

/**
 * Created by zhangxiaojian on 15/10/13.
 */
@Service("noticeService")
public class SysNoticeServiceImpl extends BaseServiceImpl<SysNotice> implements SysNoticeService {

    @Autowired
    SysNoticeMapper noticeMapper;

    public PageList getList(Paginator p, Map<String, Object> param) {
        PageHelper.startPage(p.getPageNum(), p.getPageSize());
        List<SysNotice> list = noticeMapper.getList(param);
        return new PageList(list);
    }


}
